<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网格组件</title>
    <script src="../echarts.min.js"></script>
</head>
<body>
    <div id="main" style="width: 600px; height: 400px;"></div>
</body>
<script>
    let mychart = echarts.init(document.getElementById("main"))
    let option = {
     
        title:{
            text:"网格",
            subtext:"副标题",
            left:"center"
        },
        tooltip:{},
        xAxis:{data:["产品A","产品B","产品C","产品D","产品E"]},
        yAxis:{},
        series:[{
            name:"销量",
            type:"bar",
            data:[900,700,500,1000,200]
        }]
    }
    mychart.setOption(option)
</script>
</html>